package com.smart.modules.genealogy.mapper;

import java.util.List;
import com.smart.modules.genealogy.domain.GenealogyPerson;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;

/**
 * 家谱人员Mapper接口
 */
@Mapper
public interface GenealogyPersonMapper
{
    /**
     * 查询家谱人员
     *
     * @param genealogyPersonId 家谱人员主键
     * @return 家谱人员
     */
    public GenealogyPerson selectGenealogyPersonByGenealogyPersonId(Long genealogyPersonId);

    /**
     * 查询家谱人员列表
     *
     * @param genealogyPerson 家谱人员
     * @return 家谱人员集合
     */
    public IPage<GenealogyPerson> selectGenealogyPersonList(IPage<GenealogyPerson> page,@Param("genealogyPerson") GenealogyPerson genealogyPerson);

    /**
     * 新增家谱人员
     *
     * @param genealogyPerson 家谱人员
     * @return 结果
     */
    public int insertGenealogyPerson(GenealogyPerson genealogyPerson);

    /**
     * 修改家谱人员
     *
     * @param genealogyPerson 家谱人员
     * @return 结果
     */
    public int updateGenealogyPerson(GenealogyPerson genealogyPerson);

    /**
     * 删除家谱人员
     *
     * @param genealogyPersonId 家谱人员主键
     * @return 结果
     */
    public int deleteGenealogyPersonByGenealogyPersonId(Long genealogyPersonId);

    /**
     * 批量删除家谱人员
     *
     * @param genealogyPersonIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteGenealogyPersonByGenealogyPersonIds(Long[] genealogyPersonIds);

    List<GenealogyPerson> selectGenealogyPersonListByGenealogyId(Long genealogyId);

    List<GenealogyPerson> selectGenealogyPersonListByPersonId(Long pid);
}
